package com.chris.repository;

import com.chris.domain.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

/**
 * Created by chris on 2019/2/2.
 */
public interface UserRepository extends JpaRepository<User,Long> {

    @Query(value = "select * from person where id = ?1 ", nativeQuery=true)
    public User findUserById(Long id);

    public User findByUsername(String username);
}
